import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/index',
    name: '首页',
    component: () => import(/* webpackChunkName: "about" */ '../components/content/recruitItem/index')
  },
  {
    path: '/index',
    name: '首页信息',
    component:() => import('../components/content/recruitItem/index')
  },
  {
    path: '/second',
    name: '第二页信息',
    component:() => import('../components/content/recruitItem/second')
  },
  {
    path: '/third',
    name: '第三页信息',
    component:() => import('../components/content/recruitItem/third')
  },
  {
    path: '/fourth',
    name: '第四页信息',
    component:() => import('../components/content/recruitItem/fourth')
  },
  {
    path: '/fifth',
    name: '第五页信息',
    component:() => import('../components/content/recruitItem/fifth')
  },
  {
    path: '/sixth',
    name: '第六页信息',
    component:() => import('../components/content/recruitItem/sixth')
  },
  {
    path: '/seventh',
    name: '第三页信息',
    component:() => import('../components/content/recruitItem/seventh')
  },
  {
    path: '/eighth',
    name: '第三页信息',
    component:() => import('../components/content/recruitItem/eighth')
  },
  // {
  //   path: '/dataScreen',
  //   name: '数据大屏',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/dataScreen/dataScreen')
  // },
  // {
  //   path: '/helpYou',
  //   name: '帮助界面',
  //   component:() => import('../views/helpYou/helpYou')
  // },
  // {
  //   path: '/login',
  //   name: '注册界面',
  //   component:() => import('../views/login/login')
  // },
  // {
  //   path: '/profile',
  //   name: '登录界面',
  //   component:() => import('../views/profile/profile')
  // },
]

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
